<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 
<<c:forEach items="${ificationdata }" var="tmp">
<tr>
	<td align="center">
		<input name="id" type="checkbox" id="${tmp.id }" value="${tmp.id }">
	</td>
	<td>
		<span class="pxnum size5">
			<input type="text" name="${tmp.sequence }" id="${tmp.sequence }" value="${tmp.sequence }" onblur="ajax_update(&#39;32770&#39;,&#39;sequence&#39;,this)" title="可编辑">
		</span>
	</td>
	<td>
		<span class="pxnum size7">
			<span class="pxnum size5">
				<input type="text" name="${tmp.name }" id="${tmp.name }" value="${tmp.name }" onblur="ajax_update(&#39;32770&#39;,&#39;name&#39;,this)" title="可编辑">
			</span>
		</span>
	</td>
	<td>
		<c:forEach items="${tmp.gsp }" var="tmp1">
	        		${tmp1.value }&nbsp;
	    </c:forEach>
    </td>
	<td align="center" class="ac8">
		<a href="http://localhost:8080/admin/goods_spec_edit.htm?id=32770&amp;currentPage=1">编辑</a>
		|
		<a href="/dispatcher/dispatch?dispatch_url=goods_spec_list.jsp" class="del" mulitId="${tmp.id }" >删除</a>
<!-- 		onclick="if(confirm(&#39;删除后不可恢复，是否继续?&#39;))window.location.href=&#39;http://localhost:8080/admin/goods_spec_del.htm?mulitId=32770&amp;currentPage=1&#39;" -->
	</td>
</tr>
</c:forEach>
 <tr>
          <td align="center"><input type="checkbox" name="all" id="all" value="" onclick="selectAll(this)">
             
          </td>
          <td colspan="2" class="bdel"><span class="sp1">全部</span> <span class="sp2">
            <div class="shop_btn_del shopbtn">
              <input name="Input" type="button" value="删除"  style="cursor:pointer;">
<!--               onclick="cmd(&#39;http://localhost:8080/admin/goods_spec_del.htm&#39;);" -->
            </div>
          </span> </td>
          <td colspan="4"></td>
        </tr>
<script type="text/javascript">

//$("a[class=edit]").click(function(){
////  		var id = $(this).attr("id");
////  		var name = $(this).parent().parent().children().children().children("input[class=name]").val();
////  		var sequence =  $(this).parent().parent().children().children().children("input[class=sequence]").val();
////  		$(this).attr('href',encodeURI('/dispatcher/dispatch?dispatch_url=goods_type_edit.html&id='+id+'&name='+name+'&sequence='+sequence)); 
//// //    		window.location.href="/dispatcher/dispatch?dispatch_url=goods_type_edit.html?id="+id+"&name="+name+"&sequence="+sequence;
////  	});
$("a[class=del]").click(function(){//单删
	var a = window.confirm("删除后不可恢复，是否继续？");
	var mulitId = $(this).attr("mulitId");
	if(a==true)
	{
		$.ajax({
			url:'/goodsspec/deleteone?id='+mulitId,
			type:'post',
			async:false,
			data:{},
			success:function(data){
         	}
		});
		window.location.reload();//刷新当前页面
	}
	else
	{
		
	}
});
$("input[type=button]").click(function(){//多删
	var len = $("input[type='checkbox']:checked").length;
	if(len == 0)
	{
		alert("至少选择一条数据记录");
	}
	else
	{
		var a = window.confirm("确定执行该操作？");
		if(a==true)
		{
	 		var ch;
			$.each($('input[type=checkbox]:checked'),function(i){
	 			ch =$(this).attr("id");
	 			$.ajax({
	 	 			url:'/goodsspec/deleteone?id='+ch,
	 	 			type:'post',
	 	 			async:false,
	 	 			data:{},
	 	 			success:function(data){
	 	            }
	 	 			
	 	 		});
	 			window.location.reload();//刷新当前页面
	 			$(window).scrollTop(0);//刷新并回到顶部
	 		});
			
		}
		else
		{
			
		}
	}
});
</script>
